<!--
 * @Author: Meow
 * @Date: 2019-09-26 09:45:12
 * @LastEditors: Meow
 * @LastEditTime: 2019-10-10 15:25:04
 * @Description: 数据库资源注册
 -->
<template>
  <div id="Main">
    <h1>表资源注册</h1>
    <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
      <el-tab-pane label="基本信息" name="first">

        <el-form ref="form" :model="form" label-width="120px">
          <el-form-item :label="item.name" v-for="(item,index) in form" :key="index">
            <el-input v-if="item.type==0" v-model="item.value"></el-input>
            <el-select v-if="item.type==1" v-model="item.value" placeholder="请选择">
              <el-option v-for="v in item.options" :key="v.value" :label="v.label" :value="v.value"></el-option>
            </el-select>
          </el-form-item>

          <el-form-item>
            <el-button type="primary" @click="onSubmit">立即创建</el-button>
            <el-button>取消</el-button>
          </el-form-item>
          
        </el-form>

      </el-tab-pane>

      <el-tab-pane label="字段元数据" name="second">
        <el-table :data="tableData" stripe border highlight-current-row style="width: 100%">
          <el-table-column prop="name" label="英文名称"  align="center"></el-table-column>
          <!-- <el-table-column prop="address" label="中文名称" align="center"></el-table-column>
          <el-table-column prop="type" label="字段类型" align="center"></el-table-column>
          <el-table-column prop="mode" label="字段长度" align="center"></el-table-column>
          <el-table-column prop="rule" label="指标" align="center"></el-table-column>
          <el-table-column prop="desc" label="数据生成规则" align="center"></el-table-column>
          <el-table-column prop="desc" label="标签" align="center"></el-table-column>
          <el-table-column prop="desc" label="入库时间" align="center"></el-table-column>
          <el-table-column prop="desc" label="描述" align="center"></el-table-column> -->
          <el-table-column label="操作" align="center">
            <el-button>查看</el-button>
            <el-button>修改</el-button>
            <el-button>删除</el-button>
          </el-table-column>
          <el-table-column prop="desc" label="发布暂时时间" align="center"></el-table-column>
        </el-table>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>
<script>
export default {
  name: "formMetadata",
  props: {},
  data() {
    return {
      activeName: "first",
      // 表单数据
      form: [
        {
          name: "代码",
          type: 1,
          value: "",
          options: [
            {
              value: "选项1",
              label: "-全部-"
            },
            {
              value: "选项2",
              label: "数据集"
            },
            {
              value: "选项3",
              label: "地图服务"
            }
          ]
        },
        {
          name: "中文名称",
          type: 0,
          value: ""
        },
        {
          name: "所属系统",
          type: 1,
          value: "1",
          options: [
            {
              value: "选项1",
              label: "-全部-"
            },
            {
              value: "选项2",
              label: "数据集阿萨德饭"
            },
            {
              value: "选项3",
              label: "地图服务"
            }
          ]
        },
        {
          name: "所属数据库",
          type: 1,
          value: "1",
          options: [
            {
              value: "选项1",
              label: "-全部-"
            },
            {
              value: "选项2",
              label: "数据集2"
            },
            {
              value: "选项3",
              label: "地图服务3"
            }
          ],
          isImportant: true
        },
        {
          name: "数据来源部门",
          type: 1,
          value: "1",
          options: [
            {
              value: "选项1",
              label: "-全部-"
            },
            {
              value: "选项2",
              label: "数据集"
            },
            {
              value: "选项3",
              label: "地图服务"
            }
          ]
        },
        {
          name: "汇交方式",
          type: 1,
          value: "",
          options: [
            {
              value: "选项1",
              label: "-全部-"
            },
            {
              value: "选项2",
              label: "数据集"
            },
            {
              value: "选项3",
              label: "地图服务"
            }
          ]
        },
        {
          name: "名称",
          type: 0,
          value: ""
        },
        {
          name: "名称",
          type: 0,
          value: ""
        },
        {
          name: "名称",
          type: 0,
          value: ""
        },
        {
          name: "名称",
          type: 0,
          value: ""
        }
      ],
      // 表格数据
      tableData: [
        {
          date: "2016-05-021",
          name: "2017年影像电子地图_鼓楼",
          address: "上海市普陀区金沙江路 1518 弄",
          type: "空间服务",
          mode: "快速融合",
          rule: "分权分域规则",
          desc: "用来"
        },
        {
          date: "2016-05-021",
          name: "2017年影像电子地图_鼓楼",
          address: "上海市普陀区金沙江路 1518 弄",
          type: "空间服务",
          mode: "快速融合",
          rule: "分权分域规则",
          desc: "用来"
        },
        {
          date: "2016-05-021",
          name: "2017年影像电子地图_鼓楼",
          address: "上海市普陀区金沙江路 1518 弄",
          type: "空间服务",
          mode: "快速融合",
          rule: "分权分域规则",
          desc: "用来"
        },
        {
          date: "2016-05-021",
          name: "2017年影像电子地图_鼓楼",
          address: "上海市普陀区金沙江路 1518 弄",
          type: "空间服务",
          mode: "快速融合",
          rule: "分权分域规则",
          desc: "用来"
        },
        {
          date: "2016-05-021",
          name: "2017年影像电子地图_鼓楼",
          address: "上海市普陀区金沙江路 1518 弄",
          type: "空间服务",
          mode: "快速融合",
          rule: "分权分域规则",
          desc: "用来"
        },
        {
          date: "2016-05-021",
          name: "2017年影像电子地图_鼓楼",
          address: "上海市普陀区金沙江路 1518 弄",
          type: "空间服务",
          mode: "快速融合",
          rule: "分权分域规则",
          desc: "用来"
        },
        {
          date: "2016-05-021",
          name: "2017年影像电子地图_鼓楼",
          address: "上海市普陀区金沙江路 1518 弄",
          type: "空间服务",
          mode: "快速融合",
          rule: "分权分域规则",
          desc: "用来"
        },
        {
          date: "2016-05-021",
          name: "2017年影像电子地图_鼓楼",
          address: "上海市普陀区金沙江路 1518 弄",
          type: "空间服务",
          mode: "快速融合",
          rule: "分权分域规则",
          desc: "用来"
        },
        {
          date: "2016-05-021",
          name: "2017年影像电子地图_鼓楼",
          address: "上海市普陀区金沙江路 1518 弄",
          type: "空间服务",
          mode: "快速融合",
          rule: "分权分域规则",
          desc: "用来"
        },
        {
          date: "2016-05-021",
          name: "2017年影像电子地图_鼓楼",
          address: "上海市普陀区金沙江路 1518 弄",
          type: "空间服务",
          mode: "快速融合",
          rule: "分权分域规则",
          desc: "用来"
        },
        {
          date: "2016-05-021",
          name: "2017年影像电子地图_鼓楼",
          address: "上海市普陀区金沙江路 1518 弄",
          type: "空间服务",
          mode: "快速融合",
          rule: "分权分域规则",
          desc: "用来"
        },
        {
          date: "2016-05-021",
          name: "2017年影像电子地图_鼓楼",
          address: "上海市普陀区金沙江路 1518 弄",
          type: "空间服务",
          mode: "快速融合",
          rule: "分权分域规则",
          desc: "用来"
        },
        {
          date: "2016-05-021",
          name: "2017年影像电子地图_鼓楼",
          address: "上海市普陀区金沙江路 1518 弄",
          type: "空间服务",
          mode: "快速融合",
          rule: "分权分域规则",
          desc: "用来"
        },
        {
          date: "2016-05-021",
          name: "2017年影像电子地图_鼓楼",
          address: "上海市普陀区金沙江路 1518 弄",
          type: "空间服务",
          mode: "快速融合",
          rule: "分权分域规则",
          desc: "用来"
        },
        {
          date: "2016-05-021",
          name: "2017年影像电子地图_鼓楼",
          address: "上海市普陀区金沙江路 1518 弄",
          type: "空间服务",
          mode: "快速融合",
          rule: "分权分域规则",
          desc: "用来"
        },
        {
          date: "2016-05-021",
          name: "2017年影像电子地图_鼓楼",
          address: "上海市普陀区金沙江路 1518 弄",
          type: "空间服务",
          mode: "快速融合",
          rule: "分权分域规则",
          desc: "用来"
        },
        {
          date: "2016-05-021",
          name: "2017年影像电子地图_鼓楼",
          address: "上海市普陀区金沙江路 1518 弄",
          type: "空间服务",
          mode: "快速融合",
          rule: "分权分域规则",
          desc: "用来"
        },
        {
          date: "2016-05-021",
          name: "2017年影像电子地图_鼓楼",
          address: "上海市普陀区金沙江路 1518 弄",
          type: "空间服务",
          mode: "快速融合",
          rule: "分权分域规则",
          desc: "用来"
        },
        {
          date: "2016-05-021",
          name: "2017年影像电子地图_鼓楼",
          address: "上海市普陀区金沙江路 1518 弄",
          type: "空间服务",
          mode: "快速融合",
          rule: "分权分域规则",
          desc: "用来"
        },
        {
          date: "2016-05-021",
          name: "2017年影像电子地图_鼓楼",
          address: "上海市普陀区金沙江路 1518 弄",
          type: "空间服务",
          mode: "快速融合",
          rule: "分权分域规则",
          desc: "用来"
        },
        {
          date: "2016-05-021",
          name: "2017年影像电子地图_鼓楼",
          address: "上海市普陀区金沙江路 1518 弄",
          type: "空间服务",
          mode: "快速融合",
          rule: "分权分域规则",
          desc: "用来"
        },
        {
          date: "2016-05-021",
          name: "2017年影像电子地图_鼓楼",
          address: "上海市普陀区金沙江路 1518 弄",
          type: "空间服务",
          mode: "快速融合",
          rule: "分权分域规则",
          desc: "用来"
        },
        {
          date: "2016-05-021",
          name: "2017年影像电子地图_鼓楼",
          address: "上海市普陀区金沙江路 1518 弄",
          type: "空间服务",
          mode: "快速融合",
          rule: "分权分域规则",
          desc: "用来"
        },
        {
          date: "2016-05-021",
          name: "2017年影像电子地图_鼓楼",
          address: "上海市普陀区金沙江路 1518 弄",
          type: "空间服务",
          mode: "快速融合",
          rule: "分权分域规则",
          desc: "用来"
        },
        {
          date: "2016-05-021",
          name: "2017年影像电子地图_鼓楼",
          address: "上海市普陀区金沙江路 1518 弄",
          type: "空间服务",
          mode: "快速融合",
          rule: "分权分域规则",
          desc: "用来"
        },
        {
          date: "2016-05-021",
          name: "2017年影像电子地图_鼓楼",
          address: "上海市普陀区金沙江路 1518 弄",
          type: "空间服务",
          mode: "快速融合",
          rule: "分权分域规则",
          desc: "用来"
        },
        {
          date: "2016-05-02",
          name: "2017年影像电子地图_鼓楼",
          address: "上海市普陀区金沙江路 1518 弄",
          type: "空间服务",
          mode: "快速融合",
          rule: "分权分域规则",
          desc: "用来"
        },
        {
          date: "2016-05-02",
          name: "2017年影像电子地图_鼓楼",
          address: "上海市普陀区金沙江路 1518 弄",
          type: "空间服务",
          mode: "快速融合",
          rule: "分权分域规则",
          desc: "用来"
        },
        {
          date: "2016-05-02",
          name: "2017年影像电子地图_鼓楼",
          address: "上海市普陀区金沙江路 1518 弄",
          type: "空间服务",
          mode: "快速融合",
          rule: "分权分域规则",
          desc: "用来"
        },
        {
          date: "2016-05-02",
          name: "2017年影像电子地图_鼓楼",
          address: "上海市普陀区金沙江路 1518 弄",
          type: "空间服务",
          mode: "快速融合",
          rule: "分权分域规则",
          desc: "用来"
        }
      ]
    };
  },
  methods: {
    handleClick(tab, event) {
      console.log(tab, event);
    }
  }
};
</script>
<style lang="less" scoped>
@import url("../MetadataRegistration.less");
</style>
